package com.example.springbootsfzy.service.lishenao;

import com.example.springbootsfzy.domain.FieldsOfExcellence;
import com.example.springbootsfzy.mapper.FieldsOfExcellenceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//擅长领域表
@Service
public class Fields_of_excellenceService {
    @Autowired
    private FieldsOfExcellenceMapper fieldsOfExcellenceMapper;
    //根据id查询擅长领域
    public FieldsOfExcellence selectByPrimaryKey(Long id){
        return fieldsOfExcellenceMapper.selectByPrimaryKey(id);
    }
    //根据id删除擅长领域
    public int deleteByPrimaryKey(Long id){
        return fieldsOfExcellenceMapper.deleteByPrimaryKey(id);
    }
    //新增擅长领域
    public int insert(FieldsOfExcellence record){
        return fieldsOfExcellenceMapper.insert(record);
    }
    //修改擅长领域
    public int updateByPrimaryKey(FieldsOfExcellence record){
        return fieldsOfExcellenceMapper.updateByPrimaryKeySelective(record);
    }

    //查询所有擅长领域
    public List<String> getFields(){
        return fieldsOfExcellenceMapper.getFields();
    }
}
